import os

def setup_workdir(path: str = ".")->str:
    """
    设置工作目录
    """
    try:
        work_dir = os.environ["WORK_DIR"]
    except KeyError:
        work_dir = os.path.abspath(path)
    os.chdir(work_dir)
    print(f"WORK_DIR: {os.getcwd()}")
    return work_dir